import { type RouteRecordRaw } from 'vue-router'
import {
    ShoppingCart,
    User,
    Setting,
    Box
} from '@element-plus/icons-vue'

export const routes: RouteRecordRaw[] = [
    {
        path: '/login',
        name: 'Login',
        component: () => import('@/views/Login/index.vue')
    },
    {
        path: '/',
        component: () => import('@/layouts/index.vue'),
        redirect: '/order',
        children: [
            {
                path: 'order',
                name: 'Order',
                component: () => import('@/views/order/index.vue'),
                meta: {
                    title: '订单管理',
                    icon: ShoppingCart
                }
            },
            {
                path: 'user',
                name: 'User',
                component: () => import('@/views/user/index.vue'),
                meta: {
                    title: '用户管理',
                    icon: User
                }
            },
            {
                path: 'inventory',
                name: 'Inventory',
                component: () => import('@/views/inventory/index.vue'),
                meta: {
                    title: '库存管理',
                    icon: Box
                }
            },
            {
                path: 'profile',
                name: 'Profile',
                component: () => import('@/views/profile/index.vue'),
                meta: {
                    title: '个人信息',
                    icon: Setting,
                    hidden: true // 在菜单中隐藏
                }
            },

        ]
    },
    {
        path: '/orderDetail',
        name: 'OrderDetail',
        component: () => import('@/layouts/orderlayout.vue'),
        redirect: '/order/detail',
        children: [
            {
                path: '/order/detail',
                name: 'OrderD',
                component: () => import('@/views/order/OrderDetail.vue')
            }
        ]
    }
] 